package com.ding.dailyup.model;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import static javax.persistence.GenerationType.IDENTITY;
import org.hibernate.annotations.DynamicInsert;

@Entity
@DynamicInsert
@Table(name = "user_buy_strategy")
public class UserBuyStrategy implements Serializable {
	public static final long serialVersionUID = 7006540757044140075L;
	private Long id;
	private Long userId;
	private Long strategyId;
	private LocalDateTime createTime;
	private LocalDateTime updateTime;
	private Integer status;

	public UserBuyStrategy() {
	}

	public UserBuyStrategy(Long userId, Long strategyId,
			LocalDateTime createTime, LocalDateTime updateTime,
			Integer status) {
		this.userId = userId;
		this.strategyId = strategyId;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.status = status;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "userId")
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "strategyId")
	public Long getStrategyId() {
		return strategyId;
	}

	public void setStrategyId(Long strategyId) {
		this.strategyId = strategyId;
	}

	@Column(name = "createTime")
	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime")
	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * @return 可用状态 default : 1
	 */
	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}